package com.example.qrcode.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.qrcode.entity.SceneBindingAi;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Param;
import java.util.List;

@Mapper
public interface SceneBindingAiMapper extends BaseMapper<SceneBindingAi> {

    @Select("SELECT * FROM t_scene_binding_ai WHERE device_code = #{deviceCode} AND isdelete = 0 ")
    List<SceneBindingAi> getSceneBindingAiByDeviceCode(String deviceCode);

    @Select("SELECT * FROM t_scene_binding_ai WHERE graphic_name = #{graphicName} AND isdelete = 0 ")
    List<SceneBindingAi> getSceneBindingAiByGraphicName(@Param("graphicName") String graphicName);
    
    @Select("SELECT * FROM t_scene_binding_ai WHERE scene_id = #{sceneId} AND isdelete = 0 ")
    List<SceneBindingAi> getSceneBindingAiBySceneId(@Param("sceneId") Integer sceneId);
}

